<template>
  <div class="home-header">
    <div class="left-header">
      <img src="~assets/heima.png" alt="">
      <span>电商后台管理系统</span>
    </div>
    <el-button type="info" @click="logout">退出</el-button>
  </div>
</template>

<script>
export default {
  name: 'HomeHeader',
  methods: {
    logout () {
      window.sessionStorage.removeItem('token')
      this.$router.push('/login')
    }
  }
}
</script>

<style scoped lang="less">
.home-header {
  height: 100%;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  .left-header {
    display: flex;
    align-items: center;
    img {
      // h100%
      // vertical-align: middle;
    }
    span {
      margin-left: 15px;
      color: #fff;
      font-size: 20px;
    }
  }
}
</style>
